package com.wf.smartcomm.server.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import com.google.gson.annotations.Expose;

@Entity
@Table(name = "t_image")
public class Image {
	
	@Id
	@Column(length = 32)
	private String objectId;
	
	@Column(length = 128)
	private String fileName;
	
	@Expose
	@Column(length = 4096)
	private String url;
	
	@OneToOne
	@JoinColumn(name = "uid")
	private User user;
	
	@Column(length = 20)
	private String createdAt;

	public String getObjectId() {
		return objectId;
	}

	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(String createdAt) {
		this.createdAt = createdAt;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}
